ThtmlViewer Component

Version 2.0

Copyright 1995 by L. David Baldwin
All Rights Reserved

Contents


What is the ThtmlViewer Component?

The ThtmlViewer component provides an easy way to display HyperText Markup Language (HTML) documents in a Borland Delphi program. This version of the viewer supports most of the HTML 2.0 specs with the exception of forms. Inline bitmap, GIF, and JPEG images are also supported. Starting with this version, some HTML 3 enhancements have been added, notably Tables.

While HTML documents are normally associated with the Internet World Wide Web, they are also very useful for displaying all kinds of textual material such as documentation, helpfiles, etc. Graphics are easily incorporated in these documents.

Return to Contents


What's New in Version 2.0?

And from Version 1.11

Return to Contents


Files Supplied

   README.1ST    To get started
   README.HTM    This file
   HTMLDEMO.EXE  The demo file
   SAMPLES.HTM   An HTML file showing the use of various HTML tags
   TABLETUT.HTM  A Tutorial showing the use of Tables
   GLASS.BMP     Bitmap files used by various .HTM files
   WMELON.BMP
   TABLE.BMP
   CONTENTS.BMP
   GRAY2BKG.GIF  Background image for SAMPLES.HTM
   CRHRN1.WAV    Sound for demo
   BLKGREEN.HTM  Other sample HTML files
   GUDCOLOR.HTM
   IMLIB221.DLL  ImageLib's Graphics DLL

   DEMOSRC.ZIP   Source code for the demo program
      HTMLDEMO.DPR  Source for the demo
      DEMOUNIT.PAS
      DEMOUNIT.DFM
      HTMLABT.PAS   Unit for demo
      HTMLABT.DFM
      FONTDLG.PAS   Unit for demo
      FONTDLG.DFM

   INSTALL.ZIP   Files needed to install the ThtmlViewer component
      HTMLVIEW.DCU
      HTMLVIEW.DCR
      HTMLSUBS.DCU
      READHTML.DCU
      HTMLUN1.DCU
      HTML.RES
      HTMLVIEW.HLP  The help file
      HTMLVIEW.KWF  It's keyword file
      HTMLVIEW.INT  The interface for HTMLVIEW.PAS

Return to Contents


Installing The ThtmlViewer Component

Installing new components in the library is covered starting on page 68 of the Delphi User's manual. Here's some extra comments and suggestions.
  1. The Register procedure in HTMLVIEW.DCU is set to place ThtmlViewer on the palette page tab named "Samples". You can relocate it later from the IDE if desired.
  2. Important! Backup COMPLIB.DCL or start a new library file.
  3. If you have installed an earlier version of ThtmlViewer, be sure and delete the old files before installing.
  4. Pick a directory for the ThtmlViewer component. Put HTMLVIEW.DCU, HTMLVIEW.DCR, HTMLSUBS.DCU, READHTML.DCU, HTMLUN1.DCU, and HTML.RES in the chosen directory.
  5. From the Delphi IDE, choose Options | Install Components. In the dialog, choose the Add... button. In the Add Module dialog that then comes up, the simplest approach is to use the Browse button to find HTMLVIEW.DCU. Then hit OK and the Search Path edit box will have the correct path added and ThtmlViewer will have been added to the installed units listbox. (You may have to scroll down to see it.)
  6. Hit OK on the Install Components dialog and the necessary steps will be taken to do the installation. The ThtmlViewer button will appear on the SAMPLES component page tab.
  7. Copy the IMLIB221.DLL module to the WINDOWS\SYSTEM directory if you're planning to use Gif or Jpeg images.

Return to Contents


Installing the Help File

The file HTMLVIEW.HLP will supply context sensitive help for the ThtmlViewer component. Installation of component help files is discussed in the Delphi Component Writer's Guide on page 80.
  1. Place the HTMLVIEW.KWF file in the DELPHI\HELP directory along with the other .KWF files.
  2. Close the Delphi IDE.
  3. Run Delphi's HELPINST program. Choose File | Open to open DELPHI.HDX in the DELPHI\BIN directory.
  4. Choose Keywords | Add Keyword File to add the HTMLVIEW.KWF file to the list of .KWF files.
  5. Choose File | Save or hit the blue disk button to compile and save the revised .HDX file.
  6. Now it remains to set things up so that WINHELP can find the help file, HTMLVIEW.HLP. There are several choices:

The HTMLVIEW.HLP file contains documentation for how to use the ThtmlViewer component. To access the help, open the help file from Delphi, press the Search All button and search for "ThtmlViewer". Or place a ThtmlViewer component on your form and press F1.

Return to Contents


Inline Images

Inline image display (GIF, JPEG, and PCX) is provided using ImageLib's image library. This package contains their shareware IMLIB221.DLL module. Since this is the unregistered shareware version, there will be occasional shareware "reminder" messages.

The registered version of ThtmlViewer also supports ImageLib's version 3.0 DLL. This version allows the use of PNG images as well as GIF, JPEG, and PCX.

Information on registering (and removing the messages) is discussed in Registration below. Note that the use of the ImageLib software is not manditory. If you dont' need inline images or can get by with only bitmaps, the IMLIB221.DLL need not be used.

Return to Contents


Registration Information

No registration is required of hobbyists, students, occasional users, etc.

For those using ThtmlViewer professionally, a $60 registration fee is expected. With registration comes:

If you're planning to use ThtmlViewer as part of another VCL component offered for sale, please contact me for additional information.

To register, send a check for $60US to the appropriate address below. Because of the two address confusion, it's probably best to contact me in advance even though mail will get forwarded eventually.

For full registration of ImageLib's graphics package including jpeg images, contact ImageLib.

Return to Contents


Bug Reports

Please report all bugs, suggestions, and problems to:

Dave Baldwin,
CompuServe ID: 76327,53
Internet: dbaldwin@empire.net
World Wide Web: http://www.empire.net/~dbaldwin/

22 Fox Den Rd., (Summer)
Hollis, NH 03049 USA
(603) 465-7857

144 Sands Point Drive, (Winter)
Tierra Verde, FL 33715 USA
(813) 867-3030

Return to Contents


ImageLib Graphics Software

The full ImageLib shareware package may be downloaded from CompuServe's Delphi Forum, Library 5. The filename is IMAGELIB.ZIP.

For further technical information, contact:

Jan Dekkers
Skyline Tools
Compuserve: 72130,353
Internet: 72130.353@compuserve.com

Return to Contents